import request from "@/router/axios";

// banner；列表的获取
export const getBannerList = (params) => request({
  url: "/api/admin/carouselMap/pagination",
  method: "get",
  params: params
});

// banner: 下架/上架操作
export const updateBanner = (data) => request({
  url: `/api/admin/carouselMap/status/${data.id}`,
  method: "put",
  data: data
});

// banner: 删除操作
export const delBanner = (id) => request({
  url: `/api/admin/carouselMap/delete/${id}`,
  method: "delete",
});

// banner: 新增/编辑操作
export const addBanner = (id,data) => request({
  url: `/api/admin/carouselMap/save/${id}`,
  method: "post",
  data: data
});